package com.Test;

public class Student {
  private String name;
  private int money;

  public Student(String name, int money) {
    this.name = name;
    this.money = money;
  }

  // 借钱
  public void BorrowMoney(Student A, int money) {
    System.out.println(this.name + "向" + A.name + "借" + money);
    A.GiveMoney(this, 100);

  }

  // 给钱
  public void GiveMoney(Student A, int money) {
    System.out.println(this.name + "给" + A.name + "了" + money);
    this.money -= money;
    A.money += money;
  }

  public static void main(String[] args) {
    Student zhangsan = new Student("张三", 0);
    Student lisi = new Student("李四", 200);
    System.out.println(zhangsan.money);
    System.out.println(lisi.money);
    zhangsan.BorrowMoney(lisi, 100);
    System.out.println(zhangsan.money);
    System.out.println(lisi.money);


  }
}
